import java.util.Scanner;
    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            for (int i = n; i > 0; i--) {
                for (int j = n; j > 0; j--) {
                    if(i<=j){
                        System.out.printf("%3d",i);
                    }
                    else{
                        System.out.printf("%3d",j);
                    }
                }
                System.out.println();
            }
            sc.close();
        }
}